<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>M.U.G.E.N Upgrade Notes</title>
<style type="text/css">

/*
M.U.G.E.N documentation stylesheet.


Modified from voidspace.css.

:Authors: Ian Bicking, Michael Foord
:Contact: fuzzyman@voidspace.org.uk
:Date: 2005/08/26 
:Version: 0.1.0
:Copyright: This stylesheet has been placed in the public domain.

Stylesheet for Docutils.
Based on ``blue_box.css`` by Ian Bicking
and ``html4css1.css`` revision 1.46.
*/

@import url(html4css1.css);

body {
  font-family: Helvetica, Arial, sans-serif;
}

em, i {
  font-family: Times New Roman, Times, serif;
}

a {
  color: #5577EE;
  text-decoration: none;
}

a.reference.internal {
  font-size: 80%;
}

a.toc-backref {
  color: black;
  text-decoration: none;
}

a.toc-backref:hover {
  background-color: inherit;
}

a:hover {
  background-color: #cccccc;
  text-decoration: none;
}

a img {
  border: none;
}

div.attention, div.caution, div.danger, div.error, div.hint,
div.important, div.note, div.tip, div.warning {
  background-color: #cccccc;
  padding: 3px;
  width: 80%;
}

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title  {
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: #cc0000;
  font-family: sans-serif;
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Verdana, Helvetica, Arial, sans-serif;
  border: thin solid black;
  /* This makes the borders rounded on Mozilla, which pleases me */
  -moz-border-radius: 8px;
  padding: 4px;
}

h1 {
  background-color: #445BAA;
  color: #ffffff;
  border: medium solid black;
}

h1 a.toc-backref, h2 a.toc-backref { 
  color: #ffffff;
}

h2 {
  background-color: #667788;
  color: #ffffff;
  border: thin solid black;
}

h3, h4, h5, h6 {
  background-color: #cccccc;
  color: #000000;
}

h3 a.toc-backref, h4 a.toc-backref, h5 a.toc-backref, 
h6 a.toc-backref { 
  color: #000000;
}

h1.title {
  text-align: center;
  background-color: #445BAA;
  color: #eeeeee;
  border: thick solid black;
  -moz-border-radius: 20px;
}

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

table.footnote {
  padding-left: 0.5ex;
}

table.citation {
  padding-left: 0.5ex
}

pre.literal-block, pre.doctest-block {
  border: thin black solid;
  padding: 5px;
}

.image img { border-style : solid;
            border-width : 2px;
}

h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
  font-size: 100%;
}

code, tt {
  color: #000066;
  font-size: 120%;
}

</style>
</head>
<body>
<div class="document" id="m-u-g-e-n-upgrade-notes">
<h1 class="title">M.U.G.E.N Upgrade Notes</h1>

<p>These notes serve to help you upgrade your content from older versions of M.U.G.E.N to M.U.G.E.N 1.0.</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#character-changes-in-1-0" id="id1">Character Changes in 1.0</a><ul>
<li><a class="reference internal" href="#def-file" id="id2">DEF File</a></li>
<li><a class="reference internal" href="#cns-file" id="id3">CNS File</a></li>
</ul>
</li>
<li><a class="reference internal" href="#stage-changes-in-1-0" id="id4">Stage Changes in 1.0</a></li>
<li><a class="reference internal" href="#motif-changes-in-1-0" id="id5">Motif Changes in 1.0</a><ul>
<li><a class="reference internal" href="#system-def" id="id6">system.def</a></li>
<li><a class="reference internal" href="#fight-def" id="id7">fight.def</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sprite-file-changes-in-1-0" id="id8">Sprite File Changes in 1.0</a></li>
<li><a class="reference internal" href="#music-and-sound-changes-in-1-0" id="id9">Music and Sound Changes in 1.0</a><ul>
<li><a class="reference internal" href="#quick-audio-faq" id="id10">Quick Audio FAQ</a></li>
<li><a class="reference internal" href="#detailed-change-list" id="id11">Detailed change list</a><ul>
<li><a class="reference internal" href="#mugen-cfg-changes" id="id12">mugen.cfg changes</a></li>
<li><a class="reference internal" href="#cns-changes" id="id13">CNS changes</a></li>
<li><a class="reference internal" href="#new-stage-parameters" id="id14">New stage parameters</a></li>
<li><a class="reference internal" href="#new-system-parameters" id="id15">New system parameters</a></li>
<li><a class="reference internal" href="#new-storyboard-parameters" id="id16">New storyboard parameters</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="character-changes-in-1-0">
<h1><a class="toc-backref" href="#id1">Character Changes in 1.0</a></h1>
<p>M.U.G.E.N 1.0 is backwards compatible with the majority of content from version 2002.04.14.
However, there are some new features that will be available only if a character's mugenversion is updated to 1.0.
You can update your content by the following steps:</p>
<div class="section" id="def-file">
<h2><a class="toc-backref" href="#id2">DEF File</a></h2>
<ul class="simple">
<li>In the <tt class="docutils literal">[Info]</tt> section, set <tt class="docutils literal">mugenversion = 1.0</tt>.</li>
<li>In the <tt class="docutils literal">[Info]</tt> section, add a <tt class="docutils literal">localcoord = 320, 240</tt> line. Optionally, this value can be adjusted to resize the player's coordinate space. Refer to the documentation on coordinate spaces for more info.</li>
</ul>
</div>
<div class="section" id="cns-file">
<h2><a class="toc-backref" href="#id3">CNS File</a></h2>
<ul class="simple">
<li>Locate all <tt class="docutils literal">HitDef</tt> state controllers and add 1 to the <tt class="docutils literal">pausetime</tt> of each (this change of behavior is due to a bug fix in 1.0).</li>
<li>If the player CNS has overridden state 5900, you will need to add a RemapPal controller to your state 5900. You may copy the controller from state 5900 in common1.cns.</li>
<li>Locate all PlaySnd state controllers with a <tt class="docutils literal">volume</tt> parameter and change it to use <tt class="docutils literal">volumescale</tt> instead. The behavior of volumescale is different from volume in that it interprets its parameter as a percentage instead of an offset, e.g. instead of <tt class="docutils literal">volume = 0</tt>, use <tt class="docutils literal">volumescale = 100</tt>. This information is in the &quot;Music and Sound changes&quot; section of this document.</li>
<li>Add win quotes to your character by adding a <tt class="docutils literal">[Quotes]</tt> section to the CNS file. Refer to example in kfm.cns.</li>
<li>Use the <tt class="docutils literal">StageVar</tt> trigger to detect which stage a player is on, instead of previous methods.</li>
<li>Use the <tt class="docutils literal">AILevel</tt> trigger to detect the activation of player AI, instead of previous methods.</li>
<li>Use the <tt class="docutils literal">GameWidth</tt> and <tt class="docutils literal">GameHeight</tt> triggers instead of constants like 320 and 240 where referring to the width and height of the play area.</li>
<li>Find all instances of <tt class="docutils literal">gethitvar(zoff)</tt> and replace with <tt class="docutils literal">0</tt>, or otherwise change the logic to omit the check.</li>
<li>Search for all AssertSpecial controllers and add a line <tt class="docutils literal">ignorehitpause=1</tt> if the flag is one of: <tt class="docutils literal">nostandguard</tt>, <tt class="docutils literal">nocrouchguard</tt>, <tt class="docutils literal">noairguard</tt>, <tt class="docutils literal">noautoturn</tt>, <tt class="docutils literal">noshadow</tt>, <tt class="docutils literal">nojugglecheck</tt>, <tt class="docutils literal">nowalk</tt>, <tt class="docutils literal">unguardable</tt>, <tt class="docutils literal">invisible</tt></li>
<li>Search for <tt class="docutils literal">snap</tt>, <tt class="docutils literal">mindist</tt> and <tt class="docutils literal">maxdist</tt> in all HitDefs and remove the third (z) parameter if it exists, e.g. <tt class="docutils literal">snap = 40, <span class="pre">-10,</span> 0, <span class="pre">-1</span></tt> becomes <tt class="docutils literal">snap = 40, <span class="pre">-10,</span> <span class="pre">-1</span></tt>.</li>
<li>Search for all <tt class="docutils literal">vel z</tt> and <tt class="docutils literal">pos z</tt> triggers and replace with <tt class="docutils literal">0</tt>, or otherwise change the logic to omit the check.</li>
<li>Search for all velset instances in the [Statedef ...] sections and remove the third (z) parameter if it exists, e.g. <tt class="docutils literal">velset = 0, 0, 0</tt> becomes <tt class="docutils literal">velset = 0, 0</tt>.</li>
<li>Fix any HitDefAttr triggers that are malformed. The correct syntax is <tt class="docutils literal">HitDefAttr &lt;oper&gt; &lt;value1&gt;, &lt;value2&gt;</tt> where <tt class="docutils literal">&lt;oper&gt;</tt> is <tt class="docutils literal">=</tt> or <tt class="docutils literal">!=</tt>, <tt class="docutils literal">&lt;value1&gt;</tt> has at least one letter of &quot;<tt class="docutils literal">SCA</tt>&quot;, and <tt class="docutils literal">&lt;value2&gt;</tt> is a set of 2-character strings. e.g. <tt class="docutils literal">HitDefAttr = SC</tt> should be <tt class="docutils literal">HitDefAttr = SC, NA, SA, HA</tt>.</li>
</ul>
</div>
</div>
<div class="section" id="stage-changes-in-1-0">
<h1><a class="toc-backref" href="#id4">Stage Changes in 1.0</a></h1>
<p>M.U.G.E.N 1.0 is backwards compatible with stages from version 2002.04.14.</p>
<ul class="simple">
<li>Add the following parameters to the <tt class="docutils literal">[Info]</tt> section:</li>
</ul>
<pre class="literal-block">
displayname = &quot;...&quot;         ;Name to display in select screen (replace ... with actual name)
versiondate = 01,30,2010    ;Version date of stage (MM,DD,YYYY or X.XX) (replace with actual date)
mugenversion = 1.0          ;Version of M.U.G.E.N this stage works on (1.0)
author = &quot;...&quot;              ;Stage author name
</pre>
<ul class="simple">
<li>Add the following parameters to the <tt class="docutils literal">[Camera]</tt> section and tune values accordingly (see Backgrounds documentation).</li>
</ul>
<pre class="literal-block">
overdrawhigh = 0
overdrawlow = 0
cuthigh = 35
cutlow = 25
</pre>
<ul class="simple">
<li>In the <tt class="docutils literal">[StageInfo]</tt> section, add the following:</li>
</ul>
<pre class="literal-block">
localcoord = 320, 240
xscale = 1
yscale = 1
</pre>
<ul class="simple">
<li>In the <tt class="docutils literal">[Music]</tt> section, use <tt class="docutils literal">bgmvolume</tt> instead of <tt class="docutils literal">bgvolume</tt>. <tt class="docutils literal">bgmvolume</tt> takes a parameter of <tt class="docutils literal">100</tt> for 100%, <tt class="docutils literal">50</tt> for 50% and so on. Details are in the &quot;Music and Sound changes&quot; section of this document.</li>
<li>If the stage contains a <tt class="docutils literal">hires = 1</tt> parameter, use <tt class="docutils literal">xscale = .5</tt> and <tt class="docutils literal">yscale = .5</tt> and remove the <tt class="docutils literal">hires = 1</tt> line. Some other parameters may need to be tweaked.</li>
</ul>
</div>
<div class="section" id="motif-changes-in-1-0">
<h1><a class="toc-backref" href="#id5">Motif Changes in 1.0</a></h1>
<div class="section" id="system-def">
<h2><a class="toc-backref" href="#id6">system.def</a></h2>
<ul class="simple">
<li>Add the following lines to the <tt class="docutils literal">[Info]</tt> section of system.def.</li>
</ul>
<pre class="literal-block">
versiondate = 01,30,2010  ;Version date of motif (MM,DD,YYYY or X.XX) (replace with actual date)
mugenversion = 1.0        ;Version of M.U.G.E.N this motif works on (1.0)
localcoord = 320,240      ;Local coordinate space width and height
</pre>
<ul class="simple">
<li>Optionally, add <tt class="docutils literal">[Infobox]</tt> and <tt class="docutils literal">[Infobox Text]</tt> sections to customize the contents of the mode select screen F1 info box. See data/mugen1/system.def for an example.</li>
<li>There are some &quot;D4&quot; (hi-res) motifs made for the 2002 version of MUGEN that require the <tt class="docutils literal">Doubleres = 4</tt> parameter in mugen.cfg. Since 1.0 deprecated the Doubleres functionality in favor of coordinate spaces, you will need to update these motifs. A common issue is that the fonts are drawn too large. In fight.def and system.def, edit or add a scale parameter to all elements that are drawn too large. e.g. add <tt class="docutils literal">p1.name.scale = .5, .5</tt> if there is no scale line; otherwise something like <tt class="docutils literal">p1.name.scale = .5, .5</tt> becomes <tt class="docutils literal">p1.name.scale = .25, .25</tt>.</li>
</ul>
</div>
<div class="section" id="fight-def">
<h2><a class="toc-backref" href="#id7">fight.def</a></h2>
<ul class="simple">
<li>Add a <tt class="docutils literal">[FightFx]</tt> section to fight.def. The size of fightfx.sff graphics can be adjusted with the <tt class="docutils literal">scale</tt> parameter.</li>
</ul>
<pre class="literal-block">
[FightFx]
scale = 1
</pre>
</div>
</div>
<div class="section" id="sprite-file-changes-in-1-0">
<h1><a class="toc-backref" href="#id8">Sprite File Changes in 1.0</a></h1>
<p>1.0 introduces SFF v2, which has a host of palette features as well as more compression options. Consider converting your sprite files to SFF v2 to take advantage of the new functionality.</p>
</div>
<div class="section" id="music-and-sound-changes-in-1-0">
<h1><a class="toc-backref" href="#id9">Music and Sound Changes in 1.0</a></h1>
<p>Some changes to the music and sound system were made during the course of development of 1.0.  The changes you will see, in a nutshell:</p>
<ul class="simple">
<li>Better MP3 and OGG support</li>
<li>Extensible architecture (read: &quot;M.U.G.E.N plugins&quot;)</li>
<li>Loopstart and loopend support, for compatible plugins</li>
<li>More intuitive volume settings: Master, wave/sfx, BGM</li>
<li>Volume &quot;offsets&quot; replaced by volume scaling factors</li>
<li>Various BGM bugfixes</li>
<li>Improved sound quality</li>
</ul>
<p>You <em>MUST</em> use the updated mugen.cfg included in order for BGM to work!</p>
<div class="section" id="quick-audio-faq">
<h2><a class="toc-backref" href="#id10">Quick Audio FAQ</a></h2>
<ol class="upperalpha simple" start="17">
<li>What kind of plugins does this support?</li>
</ol>
<ol class="upperalpha simple">
<li>M.U.G.E.N only recognizes plugins specifically designed for it. So, for
instance, Winamp plugins will not work. You can see the initial
<a class="reference external" href="http://elecbyte.com/blog/one-word-beta">blog post</a> for an idea of the kinds of problems involved with non-native
plugins.</li>
</ol>
<ol class="upperalpha simple" start="17">
<li>How do I make a plugin for my favorite file type?</li>
</ol>
<ol class="upperalpha simple">
<li>Consult the plugin SDK.</li>
</ol>
<ol class="upperalpha simple" start="17">
<li>How do I find loop points for my MP3s or OGGs?</li>
</ol>
<ol class="upperalpha simple">
<li>To get a good result, you will need to open your file in an audio editor
and identify the precise points where the music repeats itself. For
further details, you may wish to consult <a class="reference external" href="docs/loopguide.html">loopguide.html</a> in the docs/
directory. This is especially recommended if you are using MP3 files, as
there are several tricky issues involved for MP3 in particular.</li>
</ol>
<ol class="upperalpha simple" start="17">
<li>How do I set loop points for my other file types?</li>
</ol>
<ol class="upperalpha simple">
<li>You can't, yet. Looppoint-compatible plugins haven't yet been made for the
other file types.</li>
</ol>
<ol class="upperalpha simple" start="17">
<li>The audio stutters/skips!</li>
</ol>
<ol class="upperalpha">
<li><p class="first">Try turning up the audio buffer size and/or turning down the mixer sample
rate in mugen.cfg ([Sound] section). Also, turn off high-quality resampling
if you have it enabled. If you still can't get it to work right, then
please report the issue to us, along with your system specs. In your report,
try to distinguish between dropouts (a short period of silence), skips (the
music jumps ahead by a small amount), and stutters (the music repeats itself
briefly).</p>
<p>The new BGM system tries to keep track of its status.
You can find some summary timing statistics for the mixer callback written
to the end of mugen.log. You can also see if the system detected a decoder
underrun by searching for lines saying &quot;possible read starvation detected!&quot;
This information helps us troubleshoot the possible causes of sound
corruption.</p>
</li>
</ol>
<ol class="upperalpha simple" start="17">
<li>Why are there three Microsoft.VC90.CRT folders? Is this some kind of joke?</li>
</ol>
<ol class="upperalpha simple">
<li>Those folders are an unfortunate consequence of the way Visual C runtimes
are loaded, and are usually required for correct operation. However,
there is a way to get rid of them. You need to download and install the
<a class="reference external" href="http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2">Visual C++ 2008 SP1 redistributable package (x86)</a>. Once you have done
this, the Microsoft.VC90.CRT folders can be safely deleted.</li>
</ol>
</div>
<div class="section" id="detailed-change-list">
<h2><a class="toc-backref" href="#id11">Detailed change list</a></h2>
<p>The following plugins are in the package. See the comments in mugen.cfg for
optional parameters and usage.</p>
<ul>
<li><p class="first">mpg123</p>
<p>Supports MP3 playback using the libmpg123 decoder, which features several
optimized decoding engines written in assembly. Supports looppoints,
ReplayGain volume adjustment, and sample-accurate seeking. (Note: seeking
will lose an unnoticeable amount of accuracy if the MP3 is at a sample rate
different from the mixer sample rate.) mpg123 also fixes the &quot;my MP3 plays
slow/fast&quot; problems.</p>
</li>
<li><p class="first">vorbisplug</p>
<p>Provides Ogg Vorbis playback using libogg and libvorbisfile. Supports
loop points, ReplayGain volume adjustment, and sample-accurate seeking.
Uses M.U.G.E.N's built-in resampling service for rate conversion, where
necessary. This should provide noticeably better output than the default
SDL mixer playback.</p>
</li>
<li><p class="first">sdlmix</p>
<p>Wrapper plugin for selected BGM services provided by SDL mixer.
This means MIDI, MODs, and other tracker files.</p>
<p>sdlmix performs seamless looping from the end to the beginning of
BGM files (except for MOD/tracker files that naturally loop).
However, arbitrary loopstart and loopend points cannot be specified.</p>
</li>
</ul>
<p>The volume system has also been revamped. There is now a master volume setting,
a voice/sfx volume setting, and a BGM volume setting. That's it. Volume
settings are floating-point numbers between 0% and 100%, and multiply together
to give the final output volume. Plugins may also have individual volume
multipliers.</p>
<p>For sound effects, the product of all volume scales (master volume, wave
volume, and any additional scaling factors in the case of CNS) cannot exceed
100%. If the product is too large, it is reduced to 100%. For plugins, the
meaning of a volume scale exceeding 100% (after including plugin-specific
volume scaling) is dependent on the particular plugin.</p>
<div class="section" id="mugen-cfg-changes">
<h3><a class="toc-backref" href="#id12">mugen.cfg changes</a></h3>
<ul class="simple">
<li>[Options] WavVolume and MidiVolume removed (they were redundant).</li>
<li>[Sound] SampleRate and BufferSize parameters added. These control
the mixer parameters. See the comments in mugen.cfg for more details.</li>
<li>[Sound] ModVoices, MasterWavVolume, MidiVolume, MP3Volume, ModVolume,
CDAVolume parameters removed.</li>
<li>[Sound] SFXResampleMethod parameter added. This specifies how to perform
rate conversion of sound effects. SDL method uses SDL's built-in
conversion, which performs no interpolation. This is relatively fast, but
gives poor quality results. The libresample method performs bandlimited
interpolation, which is higher quality, but may slow down loading by a
small amount, and requires more working memory. If using libresample, you
can set SFXResampleQuality to 1 for even higher quality, at the cost of
more resource usage.</li>
<li>[Sound] BGMResampleQuality parameter added. This functions the same as
SFXResampleQuality, but for music. Note that libresample is always used
for rate conversion of music; SDL conversion is not supported.</li>
<li>[Sound] MasterVolume, WavVolume, BGMVolume parameters used to control
volumes. These can also be set in the Options screen.</li>
<li>[Music] Music group added for plugin specification.</li>
<li>[Misc] SFXBackgroundMode configures how sounds should be played in the
background. Choose from Mute or Play.</li>
<li>[Misc] BGMBackgroundMode configures how music should be played in the
background. Choose from Mute, Pause, or Play.</li>
</ul>
</div>
<div class="section" id="cns-changes">
<h3><a class="toc-backref" href="#id13">CNS changes</a></h3>
<ul class="simple">
<li>[Data] &quot;volume&quot; parameter is now ignored. Use &quot;volumescale&quot; to specify a
volume scaling factor in percent (100, i.e. no change, is the default).</li>
<li>(PlaySnd) &quot;volume&quot; parameter is now ignored. Use &quot;volumescale&quot; to specify
a volume scaling factor in percent.</li>
</ul>
</div>
<div class="section" id="new-stage-parameters">
<h3><a class="toc-backref" href="#id14">New stage parameters</a></h3>
<ul>
<li><p class="first">[Music] bgmvolume (replaces bgvolume)</p>
<p>bgmvolume is a floating-point multiplier for this stage's volume. 100% is
no change. The old parameter, &quot;bgvolume&quot;, is deprecated and is ignored.</p>
</li>
<li><p class="first">[Music] bgmloopstart, bgmloopend</p>
<p>Specifies the start and end points of the music to loop. If these are set and
looping is on, then the music will play from beginning to loopend, then
continue looping from loopstart to loopend indefinitely. The exact
specification of these parameters is plugin-dependent. For mpg123, the loop
points are specified in terms of samples. No other plugins support loop points
at present. bgmloopstart defaults to 0 (beginning) and bgmloopend defaults
to -1 (end of file).</p>
</li>
</ul>
</div>
<div class="section" id="new-system-parameters">
<h3><a class="toc-backref" href="#id15">New system parameters</a></h3>
<ul>
<li><p class="first">[Music] {title, select, vs, victory}.bgm.loopstart (also loopend and volume)</p>
</li>
<li><p class="first">[Demo Mode] fight.stopbgm</p>
<p>If fight.playbgm = 0, then setting fight.stopbgm = 0 allows the title BGM
to continue playing during Demo mode.</p>
</li>
</ul>
</div>
<div class="section" id="new-storyboard-parameters">
<h3><a class="toc-backref" href="#id16">New storyboard parameters</a></h3>
<ul class="simple">
<li>bgm.loopstart, bgm.loopend</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
